projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2285d9
)
dropdown: Make the popup as wide as the button
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 11 Jun 2020 22:29:58 +0000
(18:29 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 11 Jun 2020 22:29:58 +0000
(18:29 -0400)
Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.
gtk/gtkdropdown.c
patch
|
blob
|
history
diff --git
a/gtk/gtkdropdown.c
b/gtk/gtkdropdown.c
index 6674a8ba3518fd5413fcea89ff2644c477eba793..c0a37f40893363948d7140117cdd3f0670ea8090 100644
(file)
--- a/
gtk/gtkdropdown.c
+++ b/
gtk/gtkdropdown.c
@@
-396,6
+396,8
@@
gtk_drop_down_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (self->button, &(GtkAllocation) { 0, 0, width, height }, baseline);
+ gtk_widget_set_size_request (self->popup, width, -1);
+
gtk_native_check_resize (GTK_NATIVE (self->popup));
}